﻿namespace System.ServiceModel.DomainServices.Client
{
    using System;
    using System.Collections.Generic;

    public sealed class InvokeArgs
    {
        private bool _hasSideEffects;
        private string _operationName;
        private IDictionary<string, object> _parameters;
        private Type _returnType;

        public InvokeArgs(string operationName, Type returnType, IDictionary<string, object> parameters, bool hasSideEffects)
        {
            if (string.IsNullOrEmpty(operationName))
            {
                throw new ArgumentNullException("operationName");
            }
            if (returnType == null)
            {
                throw new ArgumentNullException("returnType");
            }
            this._operationName = operationName;
            this._returnType = returnType;
            this._parameters = parameters;
            this._hasSideEffects = hasSideEffects;
        }

        public bool HasSideEffects
        {
            get
            {
                return this._hasSideEffects;
            }
        }

        public string OperationName
        {
            get
            {
                return this._operationName;
            }
        }

        public IDictionary<string, object> Parameters
        {
            get
            {
                return this._parameters;
            }
        }

        public Type ReturnType
        {
            get
            {
                return this._returnType;
            }
        }
    }
}

